extends menu
block nav
    ul(class="nav navbar-nav")
        li <a href="/Project/Dashboard/#{Project.ProjectId}"><i class="fa fa-dashboard fa-fw"></i>概览</a>
        li(class="active") <a href="/Task/#{Project.ProjectId}"><i class="fa fa-tasks fa-fw"></i>任务</a>
        li <a href="/Team/#{Project.ProjectId}"><i class="fa fa-users fa-fw"></i>团队</a>
        li <a href="#"><i class="fa fa-cogs fa-fw"></i>设置【#{Project.ProjectName}】</a>
block append content
    div(class="container-fluid" ng-controller="TaskDetailCtrl" ng-init="TaskId=#{TaskId};GetTask();")
        div(class="panel panel-primary")
            div(class="panel-heading") <i class="fa fa-tasks fa-fw"></i> {{'#'+Task.TaskId}} {{Task.TaskName}} {{Task.CreatorNick}} 创建于 {{Task.CreateDate|date:'yyyy-MM-dd HH:mm'}}
            div(class="panel-body")
                form(role="form" novalidate name="EditTaskForm")
                    {{Task}}
                    div(class="form-group")
                        label 任务标题 *
                        input(type="text" ng-model="Task.TaskName" name="TaskName" class="form-control" placeholder="请输入任务标题" required)
                        div(ng-show="EditTaskForm.TaskName.$dirty&&EditTaskForm.TaskName.$error.required" class="text-danger") 请输入任务标题
                    div(class="form-group")
                        label 截止日期 *
                        p(class="input-group")
                            input(type="text" class="form-control" show-weeks="false" starting-day="1" current-text="今天" toggle-weeks-text="周" clear-text="清空" close-text="关闭" datepicker-popup="yyyy-MM-dd" ng-model="Task.DeadLine" required)
                            span(class="input-group-btn") <button class="btn btn-default"><i class="glyphicon glyphicon-calendar"></i></button>
                    div(class="form-group")
                        label 优先级
                        p
                            div(class="btn-group")
                                button(type="button" class="btn btn-sm btn-default" ng-model="Task.Priority" btn-radio="1") 低
                                button(type="button" class="btn btn-sm btn-default" ng-model="Task.Priority" btn-radio="2") 中
                                button(type="button" class="btn btn-sm btn-default" ng-model="Task.Priority" btn-radio="3") 高
                    div(class="form-group")
                        label 状态
                        p
                            div(class="btn-group")
                                button(type="button" class="btn btn-sm btn-default" ng-model="Task.Status" btn-radio="1") 新创建
                                button(type="button" class="btn btn-sm btn-default" ng-model="Task.Status" btn-radio="2") 进行中
                                button(type="button" class="btn btn-sm btn-default" ng-model="Task.Status" btn-radio="3") 已完成
                                button(type="button" class="btn btn-sm btn-default" ng-model="Task.Status" btn-radio="4") 已取消
                    div(class="form-group")
                        label 标签
                        p
                            div(class="btn-group")
                                button(type="button" class="btn btn-sm btn-default" ng-repeat="Tag in Tags" ng-model="Task.Tags[$index].Checked" btn-checkbox) {{Tag.TagName}}
                    div(class="form-group")
                        label 指派给
                        div(class="dropdown")
                            button(type="button" class="btn btn-sm btn-default dropdown-toggle") {{Task.AssignToUser}}<span class="caret"></span>
                            ul(class="dropdown-menu")
                                li(ng-repeat="Member in MemberList")
                                    a(href="#" ng-click="Task.AssignTo=Member.UserId;Task.AssignToUser=Member.Nick") {{Member.Nick}}
                    div(class="form-group")
                        label 任务描述
                        div(id="editor")
                    button(type="button" class="btn btn-info" ng-disabled="EditTaskForm.$invalid" ng-click="UpdateTask()") 更新